package swd.work.trans_schema_form;

import java.util.*;

public class View {
    public View() {
        setMultiLang();
        setDBProperties();
    }

    private String gstrOnloadScript;
    public String getOnloadScript() {
        return this.gstrOnloadScript;
    }

    public void setOnloadScript(String pstrParameter) {
        if (pstrParameter != null && pstrParameter.equals("null")) {
            pstrParameter = null;
        }
        this.gstrOnloadScript = pstrParameter;
    }

    private String gstrPrgTitle;
    public String getPrgTitle() {
        return this.gstrPrgTitle;
    }

    public void setPrgTitle(String pstrParameter) {
        if (pstrParameter != null && pstrParameter.equals("null")) {
            pstrParameter = null;
        }
        this.gstrPrgTitle = pstrParameter;
    }

    private String gstrPrgAction;
    public String getPrgAction() {
        return this.gstrPrgAction;
    }

    public void setPrgAction(String pstrParameter) {
        if (pstrParameter != null && pstrParameter.equals("null")) {
            pstrParameter = null;
        }
        this.gstrPrgAction = pstrParameter;
    }

    private String gstrPrgStatus;
    public String getPrgStatus() {
        return this.gstrPrgStatus;
    }

    public void setPrgStatus(String pstrParameter) {
        if (pstrParameter != null && pstrParameter.equals("null")) {
            pstrParameter = null;
        }
        this.gstrPrgStatus = pstrParameter;
    }

    private String gstrDBAlias;
    public String getDBAlias() {
        return this.gstrDBAlias;
    }

    public void setDBAlias(String pstrParameter) {
        if (pstrParameter != null && pstrParameter.equals("null")) {
            pstrParameter = null;
        }
        this.gstrDBAlias = pstrParameter;
    }

    private boolean gblnDBDebug;
    public boolean getDBDebug() {
        return this.gblnDBDebug;
    }

    public void setDBDebug(boolean pblnParameter) {
        this.gblnDBDebug = pblnParameter;
    }

    private String gstrSourceCharset;
    public String getSourceCharset() {
        return this.gstrSourceCharset;
    }

    public void setSourceCharset(String pstrParameter) {
        if (pstrParameter != null && pstrParameter.equals("null")) {
            pstrParameter = null;
        }
        this.gstrSourceCharset = pstrParameter;
    }

    private String gstrTargetCharset;
    public String getTargetCharset() {
        return this.gstrTargetCharset;
    }

    public void setTargetCharset(String pstrParameter) {
        if (pstrParameter != null && pstrParameter.equals("null")) {
            pstrParameter = null;
        }
        this.gstrTargetCharset = pstrParameter;
    }

    private String gstrSysNoList;
    public String getSysNoList() {
        return this.gstrSysNoList;
    }

    public void setSysNoList(String pstrParameter) {
        this.gstrSysNoList = pstrParameter;
    }

    private String gstrsys_no;
    public String getsys_no() {
        return this.gstrsys_no;
    }

    public void setsys_no(String pstrParameter) {
        this.gstrsys_no = pstrParameter;
    }

    private String gstrDbfNoList;
    public String getDbfNoList() {
        return this.gstrDbfNoList;
    }

    public void setDbfNoList(String pstrParameter) {
        this.gstrDbfNoList = pstrParameter;
    }

    private String gstrdbf_no;
    public String getdbf_no() {
        return this.gstrdbf_no;
    }

    public void setdbf_no(String pstrParameter) {
        this.gstrdbf_no = pstrParameter;
    }

    private String gstrdataKind;
    public String getDataKind() {
        return this.gstrdataKind;
    }

    public void setDataKind(String pstrParameter) {
        this.gstrdataKind = pstrParameter;
    }

    private String[] gstrtrans_fields;
    public void settrans_fields(String[] pstrParameter) {
        this.gstrtrans_fields = pstrParameter;
    }

    public String[] gettrans_fields() {
        return this.gstrtrans_fields;
    }

    private void setMultiLang() {
        ResourceBundle rbdTitleResource = ResourceBundle.getBundle(
                "swd\\work\\trans_schema_form\\Multi-lang", Locale.getDefault());

        try {
            setDbf_noTitle(rbdTitleResource.getString("dbf_noTitle"));
            setPrg_noTitle(rbdTitleResource.getString("prg_noTitle"));
            setSys_noTitle(rbdTitleResource.getString("sys_noTitle"));
            setFrm_noTitle(rbdTitleResource.getString("frm_noTitle"));
            setPrgTitle(rbdTitleResource.getString("prgTitle"));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void setDBProperties() {
        ResourceBundle rbdTitleResource = ResourceBundle.getBundle("WEB_Config",
                Locale.getDefault());

        try {
            setDBAlias(rbdTitleResource.getString("DB_ALIAS"));
            setDBDebug(Boolean.valueOf(rbdTitleResource.getString("DEBUG")).
                       booleanValue());
            setSourceCharset(rbdTitleResource.getString("SOURCE_CHARSET"));
            setTargetCharset(rbdTitleResource.getString("TARGET_CHARSET"));
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            rbdTitleResource = null;
        }
    }

    public String getMessage(String pstrKey) {
        return ResourceBundle.getBundle("swd\\work\\trans_schema_form\\Multi-lang",
                                        Locale.getDefault()).getString(pstrKey);
    }

    private String gstrprg_no;
    private String gstrfrm_no;
    public void setprg_no(String gstrprg_no) {
        this.gstrprg_no = gstrprg_no;
    }

    public String getprg_no() {
        return gstrprg_no;
    }

    public void setfrm_no(String gstrfrm_no) {
        this.gstrfrm_no = gstrfrm_no;
    }

    public String getfrm_no() {
        return gstrfrm_no;
    }

    public String getSys_noTitle() {
        return sys_noTitle;
    }

    public String getPrg_noTitle() {
        return prg_noTitle;
    }

    public String getFrm_noTitle() {
        return frm_noTitle;
    }

    public void setDbf_noTitle(String dbf_noTitle) {
        this.dbf_noTitle = dbf_noTitle;
    }

    public void setSys_noTitle(String sys_noTitle) {
        this.sys_noTitle = sys_noTitle;
    }

    public void setPrg_noTitle(String prg_noTitle) {
        this.prg_noTitle = prg_noTitle;
    }

    public void setFrm_noTitle(String frm_noTitle) {
        this.frm_noTitle = frm_noTitle;
    }

    public String getDbf_noTitle() {
        return dbf_noTitle;
    }

    private String sys_noTitle=null;
    private String dbf_noTitle=null;
    private String prg_noTitle=null;
    private String frm_noTitle=null;
}
